Home | Trees | Index | Help |
|
---|
Module urllib :: Class URLopener |
|
FancyURLopener
Method Summary | |
---|---|
__init__(self,
proxies,
**x509)
| |
__del__(self)
| |
Add a header to be used by the HTTP interface only e.g. | |
cleanup(self)
| |
close(self)
| |
Handle http errors. | |
Default error handler: close the connection and raise IOError. | |
Use URLopener().open(file) instead of open(file, 'r'). | |
Use "data" URL. | |
Use local file or FTP depending on form of URL. | |
Use FTP protocol. | |
Use Gopher protocol. | |
Use HTTP protocol. | |
Use HTTPS protocol. | |
Use local file. | |
Overridable interface to open unknown URL type. | |
Overridable interface to open unknown URL type. | |
retrieve(url) returns (filename, headers) for a local object or (tempfilename, headers) for a remote object. |
Class Variable Summary | |
---|---|
str |
version = 'Python-urllib/1.15'
|
NoneType |
_URLopener__tempfiles = None |
Method Details |
---|
addheader(self, *args)Add a header to be used by the HTTP interface only e.g. u.addheader('Accept', 'sound/basic') |
http_error(self, url, fp, errcode, errmsg, headers, data=None)Handle http errors. Derived class can override this, or provide specific handlers named http_error_DDD where DDD is the 3-digit error code. |
http_error_default(self, url, fp, errcode, errmsg, headers)Default error handler: close the connection and raise IOError. |
open(self, fullurl, data=None)Use URLopener().open(file) instead of open(file, 'r'). |
open_data(self, url, data=None)Use "data" URL. |
open_file(self, url)Use local file or FTP depending on form of URL. |
open_ftp(self, url)Use FTP protocol. |
open_gopher(self, url)Use Gopher protocol. |
open_http(self, url, data=None)Use HTTP protocol. |
open_https(self, url, data=None)Use HTTPS protocol. |
open_local_file(self, url)Use local file. |
open_unknown(self, fullurl, data=None)Overridable interface to open unknown URL type. |
open_unknown_proxy(self, proxy, fullurl, data=None)Overridable interface to open unknown URL type. |
retrieve(self, url, filename=None, reporthook=None, data=None)retrieve(url) returns (filename, headers) for a local object or (tempfilename, headers) for a remote object. |
Class Variable Details |
---|
version
|
_URLopener__tempfiles
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sun Jul 03 17:07:34 2005 | http://epydoc.sf.net |